# -*- coding: utf-8 -*-
from selenium.webdriver.remote.webelement import WebElement


class ZhiDaoSection:
    num: str
    name: str
    duration: str
    finished: bool
    element: WebElement

    def __init__(self, num: str, name: str, duration: str, finished: bool, element: WebElement):
        self.num = num
        self.name = name
        self.duration = duration
        self.finished = finished
        self.element = element

    def get_content(self):
        finish_text = "未完成"
        if self.finished:
            finish_text = "已完成"
        return self.num + " " + self.name + "(" + self.duration + ") " + finish_text

    def get_element(self):
        return self.element